package com.example.net_library.net

import com.example.net_library.entity.LoginEntity
import com.example.net_library.entity.RecommonEntity
import com.example.net_library.entity.Res
import com.example.net_library.entity.SimpleTypeEntity
import com.example.net_library.entity.SimpleVideoEntity
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface ApiService {
    @POST("/user/login")
    suspend fun login(@Query("password")pwd:String,@Query("username")name:String):Res<LoginEntity>

    @GET("/videotype/getSimpleType")
    suspend fun getSimpleType():Res<List<SimpleTypeEntity>>

    @GET("/videosimple/getSimpleVideoByChannelId")
    suspend fun getSimpleVideo(@Query("channelId")id:String,@Query("page")page:Int,@Query("pagesize")size:Int):
            Res<List<SimpleVideoEntity>>

    @GET("/videosimple/getRecommendSimpleVideo")
    suspend fun getRecommendVideo(@Query("page")page:Int,@Query("pagesize")size:Int):Res<List<RecommonEntity>>
}